package com.xian.www;

class Animal{
    public String name;
    public int age;
    public float weight;

    public void eat(){
        System.out.println(name + "正在吃饭");
    }
    public void sleep(){
        System.out.println(name + "正在睡觉");
    }
}
class Dog extends Animal {

    public Dog(){
        name = "大黄";
        age = 4;
        weight = 50.0f;
    }

    void Bark(){
        System.out.println(name + "汪汪汪~~~");
    }
}

class Cat extends Animal{

    public Cat(){
        name = "小黑";
        age = 1;
        weight = 20.0f;
    }
    void Mew(){
        System.out.println(name + "喵喵喵~~~");
    }
}

public class demo1 {
    public static void main(String[] args){
        Dog dog = new Dog();
        dog.eat();
        dog.sleep();
        dog.Bark();
        System.out.println("=======================================================");
        Cat cat = new Cat();
        cat.eat();
        cat.sleep();
        cat.Mew();

    }

}
